<style type="text/css">
    .fui-navbar ~ .fui-content, .fui-content.navbar{padding:0;}
    .fui-list-group{margin-top:0;}
    .log-optiontitle{font-size:0.6rem;color:#999;}
.mask{
	position: fixed;
	background:rgba(0,0,0,0.5);
	width: 100%;
	height: 100%;
	top: 0;
	text-align: center;
	z-index: 100;
	display: none;
}
 .mask .code_box{
	position: absolute;
	margin-top:-10rem;
	top: 50%;
	left: 50%;
	margin-left: -7.5rem;
	width: 15rem;
	height: 20rem;
	background: #fff;
	border-radius:20px;
	line-height: 2.5rem;
	font-size: 0.7rem;
	color: #000;
	font-weight: bold;
}
 .mask .code_box img{
	width: 10rem;
	height: 10rem;
}
.mask .code_box .img_box{
	line-height: 3;
	height:auto;
} 
.mask .cav_code{
	width: 10rem;
	height: 1.8rem;
	line-height: 1.8rem;
	margin: auto;
	background: #f7f7f7;
	color: #6f6f6f;
}
 .mask .error{
	font-size: 0.65rem;
	line-height: 1.2rem;
	font-weight: normal;
	color: #e85a6a;
	margin-top: 0.5rem;
}
/*核销码*/
.code_box{
	text-align: center;
	background: #fff;
	height: 11.3rem;
	padding-top: 1.1rem;
	margin-bottom: 0.5rem;
}

.code_box img{
	height: 6.5rem;
	width: 6.5rem;
	margin-top: 0.2rem;
	vertical-align: middle;
}
.code_box .cav_code{
	height: 1.7rem;
	line-height: 1.7rem;
	margin: 0.7rem auto;
	margin-bottom: 0.55rem;
	background: #f7f7f7;
	width: 8.2rem;
	color: #666;
	font-size:0.8rem;
}
.btn.btn-sm {
    margin: 0 0.1rem;
}
</style>
<link rel="stylesheet" href="../addons/jy_creditshop/resource/css/common.css?v=1" />
<link rel="stylesheet" href="../addons/jy_creditshop/resource/css/common-new.css?v=1" />
<div class='fui-page  order-list-page'>
    <div class="fui-header">
       <div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
        <div class="title">我的订单</div>
        <div class="fui-header-right"></div>
    </div>
    <div id="tab" class="fui-tab fui-tab-danger">
		<a ng-class="{'external active':pagedata.params.type == 100}" href="javascript:" ng-click="pagedata.params.type = 100;tool.get_list('jy_credit4shop/log_list4/main/type=100',true);">全部记录</a>
        <a ng-class="{'external active':pagedata.params.type == 0}" href="javascript:" ng-click="pagedata.params.type = 0;tool.get_list('jy_credit4shop/log_list4/main/type=0',true);">兑换记录</a>
        <a ng-class="{'external active':pagedata.params.type == 1}" href="javascript:" ng-click="pagedata.params.type = 1;tool.get_list('jy_credit4shop/log_list4/main/type=1',true);">中奖记录</a>
    </div>
    <div class='fui-content' style="margin-top:4.5rem">
        <div ng-if="!pagedata.list || pagedata.list.length==0" class="fui-message fui-message-popup in content-empty">
            <div class="icon ">
                <i class="icon icon-information"></i>
            </div>
            <div class="content">未找到任何记录~</div>
        </div>
        <div ng-repeat="item in pagedata.list" class="creditshop-log-list-a" style="border-bottom:0.5rem solid #eee;">
            <div class="creditshop-log-header fui-list" style="border-bottom:1px solid #e9e9e9;">
                <div class="fui-list-media" style="color:#666;font-size:0.7rem;">订单号{{item.logno}}</div>
                <div class="fui-list-inner" style="text-align:right;font-size:0.7rem;color:#f60;">{{item.statustitle}} </div>
                <div ng-if="item.type== 0 && item.goods.goodstype== 0 && item.goods.isverify==1 && item.isreply==1 && item.status==3 && item.iscomment==0" class="fui-list-inner" style="text-align:right;font-size:0.7rem;color:#f60;">待评价 </div>
                <div ng-if="item.type== 0 && item.goods.goodstype== 0 && item.goods.isverify==1 && item.isreply==1 && item.status==3 && item.iscomment==1" class="fui-list-inner" style="text-align:right;font-size:0.7rem;color:#f60;">追加评价 </div>
            </div>
            <a data-nocache='true' href="javascript:;" ng-click="access_json('jy_credit4shop/log_detail//id='+item.id+'&merchid='+item.merchid)">
                <div class="fui-list">
                    <div class="fui-list-media">
                        <img class="round" ng-src="{{tomedia(item.goods.thumb)}}">
                    </div>
                    <div class="fui-list-inner fui-list-mid" style="margin:0;">
                        <div class="credit-log-list-title" style="font-size:0.7rem;color:#333;">                          
                            <span ng-if="item.goods.goodstype==0" class="fui-label fui-label-primary">商品</span>
                            <span ng-if="item.goods.goodstype==1" class="fui-label fui-label-success">优惠券</span>
                           
                            <span ng-if="item.goods.goodstype==2" class="fui-label fui-label-warning">余额</span>
                           
                            <span ng-if="item.goods.goodstype==3" class="fui-label fui-label-danger">红包</span>
							
                            {{item.goods.title}}
                         
                            <div ng-if="item.optiontitle" class="log-optiontitle">规格：{{item.optiontitle}}</div>
							<div class="subtitle">店：{{item.merchname || '平台'}}</div>
							<div class="subtitle">{{item.createtime}}</div>
                        </div>
                    </div>
                    <div class="fui-list-media" style="margin:0;">
                        <span class="price" style="font-size:0.6rem;color:#f20;text-align: right;">
                            <span class="big">{{item.credit}}</span>{{item.credit_typetitle ||'积分'}}
                          
                                <br /><span ng-if="item.money>0">&yen;{{item.money}}{{ifelse(item.type==1,'抽奖','兑换')}}</span>
                          
                        </span>
                    </div>
                </div>
            </a>
			<div class="fui-list-group-title lineblock">
					<span style="color:#999;font-size:0.65rem"><i class="icon jinyunicon icon-shijian" style="color:#f60;font-size:0.60rem"></i> {{item.createtime}}</span>
                    <span class="status noremark r-f"> 实付: <span class="text-danger">￥{{item.money}}</span></span>
            </div>
            <div class="fui-list fui-list-bottom" style="font-size:0.6rem;">
                <div class="fui-list-inner">
                        <span ng-if="item.status ==2 && item.goods.goodstype==0 && item.goods.isverify==1" style="color:#f60;">兑奖码：{{item.verifycode}}</span>
                </div>
                <div class="fui-list-media fui-list-bot-inner" data-class="color:#666;" style="margin:0;">
					<a ng-if="item.status ==0" class="btn btn-sm btn-default" href="javascript:;" ng-click="pay_submit({},'jy_credit4shop/log_list4/pay/id='+item.id,'jy_credit4shop/log_list4/')">支付订单</a>
					<a ng-if="item.goods.goodstype==0 && item.goods.isverify==1 && item.status==2" class="btn btn-sm btn-default" href="javascript:;" ng-click="pagedata.show_verify(item.verifyurl,item.verifycode)">
                                <i class="icon icon-qrcode" style="vertical-align: middle;"></i>
                                <span>兑换二维码</span>
                    </a>
					<a ng-if="item.status ==1" class="btn btn-sm btn-default btn-packet"  href="javascript:;" ng-click="post({'id':item.id},'jy_credit4shop/log_list4/rafund/')">申请退款</a>
					<a ng-if="item.goods.goodstype==0 && item.status ==2" class="btn btn-sm btn-default btn-packet"  href="javascript:;" ng-click="post({'id':item.id},'jy_credit4shop/log_list4/receive/')">确认收货</a>
					<a ng-if="item.goods.goodstype==3 && item.status ==2" class="btn btn-sm btn-default btn-packet"  href="javascript:;" ng-click="access_json('jy_credit4shop/log_list4/red/logid='+item.id)">领取红包</a>
                    <a ng-if="item.isreply==1 && item.iscomment < 2 && item.time_finish > 0 && (item.goods.goodstype==0 || item.goods.goodstype==1)&& item.status ==3 && item.iscomment == 0" class="btn btn-sm btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/comment//logid='+item.id+'&goodsid='+item.goodsid)">评价</a>
                    <a ng-if="item.isreply==1 && item.iscomment < 2 && item.time_finish > 0 && (item.goods.goodstype==2 || item.goods.goodstype==3) && item.status ==3 && item.iscomment == 0" class="btn btn-sm btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/comment//logid='+item.id+'&goodsid='+item.goodsid)">评价</a>
                    <a ng-if="item.isreply==1 && item.iscomment < 2 && item.time_finish > 0 && (item.goods.goodstype==2 || item.goods.goodstype==3) && item.status ==3 && item.iscomment == 1" class="btn btn-sm btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/comment//logid='+item.id+'&goodsid='+item.goodsid)">追加评价</a>
					<a ng-if="item.goods.goodstype==0 && item.status ==7" class="btn btn-sm btn-default btn-packet"  href="javascript:;" ng-click="post({'id':item.id},'jy_credit4shop/log_list4/status1/')">平台发货</a>
					<a ng-if="item.goods.goodstype==0 && item.status ==7" class="btn btn-sm btn-success btn-packet"  href="javascript:;" ng-click="post({'id':item.id},'jy_credit4shop/log_list4/status8/')">退币到余额</a>

                </div>
            </div>
        </div>   
	 </div>
</div>
<div class="mask">
		<div class="code_box">
							<p>请将二维码出示给店员</p>
							<div class="img_box" id="show_verify_ewm">
								
							</div>
							<div class="cav_code" id="show_verify_code"></div>
							<div class="error">
								<p style="padding: 0 1.3rem">温馨提示：为了更好的保护您利益,请不要轻易将您的核销二维码泄露给他人</p>
							</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.tool.get_list('jy_credit4shop/log_list4/main/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_credit4shop/log_list4/main/');
}
scope.pagedata.show_verify=function(url,code){
			scope.tool.qr(url,'show_verify_ewm',150)
			$('#show_verify_code').text(code);
			$('.mask').css({display:'block'});
}	
$('.mask').click(function(){
	$(this).css({display:'none'})
})
</script>